<template>
	<HButton plain size="small" :block="false" @click="onPhoto">
		拍照
	</HButton>
</template>

<script>
	import HButton from './index.vue'
	export default {

		components: {
			HButton
		},
		methods: { 
			async onPhoto() {
				let img = await this.$chooseImg()
				this.$emit('photo', {
					icon: 'photo',
					file: img,
					timestamp: Date.now()
				})

			}
		}
	}
</script>

<style>
</style>
